<?php

class Hash {

	/*
	* @param string $algo  = the algorithm (md5, shal, whirlpool, etc)
	* @param string $data = the data to encode
	* @param string $salt = the salt this should be the same throughout the system
	* @return string the hashed/salted data
	*/

	public static function create($algo, $data, $salt){

		$context = hash_init($algo, HASH_HMAC, $salt);
		hash_update($context, $data);
		return hash_final($context);

	}

}